home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
wardial.arc
/
SEND_ASC.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-04-30
|
2KB
|
81 lines
Procedure Send_asc;
var a:char;
infile:text;
file_name:string[20];
ok,go_back:boolean;
begin
xcoord:=wherex;
go_back:=false;
ycoord:=wherey;
Move(screen1,screen2,4000);
Normvideo;
lowvideo;
Window(1,1,80,21);
normvideo;
textcolor(cyan);
frame(14, 5,36,11);
lowvideo;
window(15,6,35,10);
repeat
clrscr;
gotoxy(1,1);
textcolor(white);
writeln(' Send File (Ascii)');
beep;
textcolor(7);
writeln;
Writeln(' Enter File Name ');write(' > ');
Readln(File_name);
if length(file_name) > 0 then
begin
assign(infile, file_name);
{$I-} Reset(infile) {$I+};
ok:=(IOResult=0);
end else
begin
go_back:=true;
ok:=true;
end;
if not ok then writeln('File Not found');
delay(2000);
until ok;
if not go_back then
begin
normvideo;
move(screen2,screen1,4000);
lowvideo;
Window(1,1,80,21);
gotoxy(1,1);
insline;
textcolor(white+blink);
write(chr(16):35);
textcolor(7);
write(' SEND FILE ');
textcolor(white+blink);
writeln(chr(17));
normvideo;
lowvideo;
window(1,2,80,21);
ClrScr;
gotoxy(1,21);
textcolor(maincolor);
repeat
read(infile,a);
write(a);
write_byte(a);
until eof(infile);
writeln;writeln;writeln('DONE.');
delay(2000);beep;beep;
end;
normvideo;
move(screen2,screen1,4000);
lowvideo;
window(1,1,80,21);
textcolor(maincolor);
gotoxy(xcoord,ycoord);
end;